<template>
	<el-main>
		<el-form label-width="120px"  label-position="left">
			<el-form-item label="人员姓名" prop="userId">{{form.userName}}</el-form-item>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="薪资年度" prop="year">{{form.year}}</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="薪资月份" prop="month">{{form.month}}月
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="岗位工资" prop="postSalary">{{form.postSalary}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="薪级工资" prop="levelSalary">{{form.levelSalary}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="粮油补贴" prop="foodSalary">{{form.foodSalary}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="特殊岗位津贴" prop="otherPassSalary">{{form.postSalaryOther}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="交通补贴" prop="transportSalary">{{form.transportSalary}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="岗位津贴" prop="postAllowance">{{form.postAllowance}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="应发合计" prop="sumAmount">{{form.sumAmount}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="退休金" prop="pensoin">{{form.pensoin}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="失业保险" prop="unemployment">{{form.unemployment}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="医保" prop="medical">{{form.medical}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="公积金" prop="accumulationFund">{{form.accumulationFund}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="个人所得税" prop="tax">{{form.tax}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="其它费用" prop="costOther">{{form.costOther}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :lg="12">
					<el-form-item label="实扣费用" prop="realCost">{{form.realCost}}
						/元
					</el-form-item>
				</el-col>
				<el-col :lg="12">
					<el-form-item label="实发工资" prop="realSalary">{{form.realSalary}}
						/元
					</el-form-item>
				</el-col>
			</el-row>
			<el-form-item label="薪资备注">{{form.remark}}
			</el-form-item>
		</el-form>
	</el-main>
</template>

<script>
export default {
	emits: ['success', 'closed'],
	components: {
	},
	data() {
		return {
			form: {
				recordId: this.$route.query.recordId,
				sortNo: 0,
				userName: "",
				year: "",
				month: "",
				postSalary: 0,
				levelSalary: 0,
				foodSalary: 0,
				postSalaryOther: 0,
				transportSalary: 0,
				postAllowance: 0,
				sumAmount: 0,
				pensoin: 0,
				unemployment: 0,
				medical: 0,
				accumulationFund: 0,
				tax: 0,
				costOther: 0,
				realCost: 0,
				realSalary: 0,
				msgType: "",
				remark:""
			},
		}
	},
	mounted() {
	this.getHrSalaryRecordById();
	},
	methods: {
		//表单注入数据
		async getHrSalaryRecordById()
		{
			let res = await this.$API.hr.hrSalary.getHrSalaryRecordById.get({recordId:this.form.recordId});
			{
				if(res.code==200)
				{
					this.form.recordId = res.data.recordId
					this.form.sortNo = res.data.sortNo
					this.form.userName = res.data.userName
					this.form.year = res.data.year
					this.form.month = res.data.month
					this.form.postSalary = res.data.postSalary
					this.form.levelSalary = res.data.levelSalary
					this.form.foodSalary = res.data.foodSalary
					this.form.postSalaryOther = res.data.postSalaryOther
					this.form.transportSalary = res.data.transportSalary
					this.form.postAllowance = res.data.postAllowance
					this.form.sumAmount = res.data.sumAmount
					this.form.pensoin = res.data.pensoin
					this.form.unemployment = res.data.unemployment
					this.form.medical = res.data.medical
					this.form.accumulationFund = res.data.accumulationFund
					this.form.tax = res.data.tax
					this.form.costOther = res.data.costOther
					this.form.realCost = res.data.realCost
					this.form.realSalary = res.data.realSalary
					this.form.msgType = res.data.msgType
					this.form.remark = res.data.remark
				}else
				{
					this.$alert(res.message, "提示", {type: 'error'})
				}
			}
		}
	}
}
</script>
<style scoped>
:deep(.el-form-item){
	display: inline-flex;
}
</style>
